#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Comzyh
# @Date:   2014-09-20 00:10:49
# @Last Modified by:   Comzyh
# @Last Modified time: 2014-09-20 13:46:21

import json

def main():
	Map = {
    "cells": [],
    "tents": [],
    "tick_count": 0
	}
	map_height = 650
	map_width = 800
	border = 80
	initial_hp = 90
	#四方的细胞
	Map['cells'].append({
            "hp":initial_hp,
            "ishero":True,
            "side":1,
            "x":border,
            "y":border
        })
	Map['cells'].append({
            "hp":initial_hp,
            "ishero":True,
            "side":2,
            "x":map_width-border,
            "y":border
        })
	Map['cells'].append({
            "hp":initial_hp,
            "ishero":True,
            "side":3,
            "x":border,
            "y":map_height-border
        })
	Map['cells'].append({
            "hp":initial_hp,
            "ishero":True,
            "side":4,
            "x":map_width-border,
            "y":map_height-border
        })
	#中立细胞
	for x in xrange(160,720,160):
		for y in xrange (85,650,160):
			Map['cells'].append({
	            "hp":40,
	            "ishero":False,
	            "side":0,
	            "x":x,
	            "y":y,
	            "occupy_goal":10,
        	})
	print json.dumps(Map,sort_keys=True,indent=2)

if __name__ == '__main__':
	main()
